<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title></title>
		<style type="text/css">
			canvas{
				border: 1px solid #333;
			}
		</style>
	</head>
	<body>
		<!-- canvas画布的大小，不能用css来调整，用属性来调整 -->
		<canvas id="canvas" width="600" height="400"></canvas>
		
	</body>
	<script type="text/javascript">
		//获取画布
		let canvas=document.getElementById("canvas");
		//获取上下文
		let ctx=canvas.getContext("2d");
		
		ctx.moveTo(100,100)
		ctx.lineTo(200,100)
		ctx.lineTo(200,200)
		
		ctx.lineJoin="bevel"			//线段交汇处：斜角
		ctx.lineJoin="round"			//线段交汇处：圆角
		ctx.strokeStyle="red"
		ctx.lineWidth=10
		ctx.stroke()
		
	</script>
</html>